package SalaryManagementSystem;

public class SaleManager extends Saler {
     private double ratio;//销售经理提成比例
public  SaleManager(){//无参

}
    public SaleManager(double ratio) {//有参
        this.ratio = ratio;
    }
    public int realWage(){
    return (int)(Saler.getMoney()*ratio);//因为在Saler类里面定义了money静态变量存储所以员工的总销售额
    }

    public static void main(String[] args) {
      Employee employee=new Employee(1,"ls","男",22,"初级","大学","销售",true);
      Saler saler=new Saler(2,"zs","男",23,"初级","大学","销售",true,0.8,5000);
     SaleManager saleManager=new SaleManager(0.9);//提成比例0.9
        System.out.println("经理工资："+saleManager.realWage());
    }
}
